Normalize SIDE argument of split-window (Bug#8916).
authormartin rudalics <rudalics@gmx.at>
Wed, 22 Jun 2011 09:23:31 +0000 (11:23 +0200)
committermartin rudalics <rudalics@gmx.at>
Wed, 22 Jun 2011 09:23:31 +0000 (11:23 +0200)
* window.el (split-window): Normalize SIDE argument (Bug#8916).

lisp/ChangeLog
lisp/window.el

index bf30fdc303d98ab27523e27c15d3785b2f38c498..efc3c13b5aa0b71c697e72be63f7812765007163 100644 (file)
@@ -8,6 +8,7 @@
        * window.el (display-buffer-default-specifiers)
        (display-buffer-alist): Remove entries for pop-up-frame-alist.
        Suggested by Katsumi Yamaoka <yamaoka@jpl.org>.
+       (split-window): Normalize SIDE argument (Bug#8916).
 
        * frame.el (pop-up-frame-alist, pop-up-frame-function)
        (special-display-frame-alist, special-display-popup-frame):
index 1c347c7006776476a8d1f2d4cb95fffc75cde3ee..ac43fe7703c7462e2c6c90ef0b4d18768a2751cd 100644 (file)
@@ -3014,7 +3014,11 @@ new window are inherited from the window selected on WINDOW's
 frame.  The selected window is not changed by this function."
   (interactive "i")
   (setq window (normalize-any-window window))
-  (let* ((horizontal (not (memq side '(nil below above))))
+  (let* ((side (cond
+               ((not side) 'below)
+               ((memq side '(below above right left)) side)
+               (t 'right)))
+        (horizontal (not (memq side '(nil below above))))
         (frame (window-frame window))
         (parent (window-parent window))
         (function (window-parameter window 'split-window))